package com.summer.framework.common.exception;

import com.netflix.hystrix.exception.HystrixBadRequestException;
import lombok.Data;
import lombok.Getter;
import lombok.ToString;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;

/**
 * @auther: 杨杰
 * @date: 2019/1/11 11:07
 * @description: 自定义异常父类
 */
@Data
@ToString
@ResponseStatus(value = HttpStatus.BAD_REQUEST)
public class BaseException extends RuntimeException {

    private int status = 400;

    private String message;


    public BaseException(Integer status, String message) {
        super(message);
        this.status = status;
        this.message = message;
    }
}
